Skip to content

Add generic navigation apis to Page Navigation - #22010

Merged
MrJul merged 12 commits into
mainfrom
page_navigation_generic
Sep 4, 2026
Merged

Add generic navigation apis to Page Navigation#22010
MrJul merged 12 commits into
mainfrom
page_navigation_generic

Conversation

@emmauss

@emmauss emmauss commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What does the pull request do?

Implements #21984
Adds new api to INavigation, allowing custom navigation services to use page navigation without creating Page instances.

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0068446-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@emmauss emmauss added the api-needs-review The PR adds new public APIs that should be reviewed. label Aug 24, 2026
@emmauss
emmauss marked this pull request as ready for review August 24, 2026 14:02
@emmauss emmauss self-assigned this Aug 25, 2026
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0068772-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@jsuarezruiz
jsuarezruiz self-requested a review August 26, 2026 10:55
{
var instance = new T();

return PushModalAsyncPrivate(instance, transition);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we pass null as the third argument here? This currently selects the parameter overload, so the transition becomes Parameter and never runs. PushModalAsyncPrivate(instance, transition, null) could gfix it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0068882-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0068896-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul added the api-needs-changes The new public APIs need some changes. label Sep 3, 2026
@MrJul

MrJul commented Sep 3, 2026

Copy link
Copy Markdown
Member

See this issue for the requested API changes.

@MrJul MrJul removed the api-needs-review The PR adds new public APIs that should be reviewed. label Sep 3, 2026
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0069375-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Comment thread src/Avalonia.Controls/Page/INavigation.cs Outdated
/// <summary>
/// Pushes <paramref name="page"/> onto the navigation stack asynchronously using <see cref="PageTransition"/>, with optional <paramref name="parameter"/>.
/// </summary>
public Task PushAsync(Page page, IPageTransition? transition, object? parameter = null) => PushAsyncPrivate(page, transition, parameter);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The optional parameter conflicts with the overload right above: make it non-optional.
Applicable to PushAsync, ReplaceAsync and PushModalAsync.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0069411-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul added api-approved The new public APIs have been approved. and removed api-needs-changes The new public APIs need some changes. labels Sep 4, 2026

@MrJul MrJul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MrJul MrJul added this to the 12.2 milestone Sep 4, 2026
@MrJul
MrJul added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit f2e8e89 Sep 4, 2026
11 checks passed
@MrJul
MrJul deleted the page_navigation_generic branch September 4, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-approved The new public APIs have been approved. enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants